
(*******************************************
wrapper for ocaml
********************************************)



let _ = Callback.register "open_out" open_out
let get_stdout () = stdout
let _ = Callback.register "stdout" get_stdout

let _ = Callback.register "flush" flush

(*******************************************
wrapper for cil
********************************************)

let _ = Callback.register "Frontc.parse" Frontc.parse



let get_defaultCilPrinter () = Cil.defaultCilPrinter
let _ = Callback.register "Cil.defaultCilPrinter" get_defaultCilPrinter

let _ = Callback.register "Cil.prepareCFG" Cil.prepareCFG
let _ = Callback.register "Cil.computeCFGInfo" Cil.computeCFGInfo


let _ = Callback.register "Cil.dumpFile" Cil.dumpFile
let _ = Callback.register "Cil.dumpGlobal" Cil.dumpGlobal
let _ = Callback.register "Cil.dumpInit" Cil.dumpInit
let _ = Callback.register "Cil.dumpBlock" Cil.dumpBlock
let _ = Callback.register "Cil.dumpStmt" Cil.dumpStmt



let _ = Callback.register "Cil.d_type" Cil.d_type
let _ = Callback.register "Cil.d_exp" Cil.d_exp
let _ = Callback.register "Cil.d_lval" Cil.d_lval
let _ = Callback.register "Cil.d_offset" Cil.d_offset
let _ = Callback.register "Cil.d_init" Cil.d_init
let _ = Callback.register "Cil.d_binop" Cil.d_binop
let _ = Callback.register "Cil.d_unop" Cil.d_unop
let _ = Callback.register "Cil.d_attr" Cil.d_attr
let _ = Callback.register "Cil.d_attrparam" Cil.d_attrparam
let _ = Callback.register "Cil.d_attrlist" Cil.d_attrlist
let _ = Callback.register "Cil.d_instr" Cil.d_instr
let _ = Callback.register "Cil.d_label" Cil.d_label
let _ = Callback.register "Cil.d_stmt" Cil.d_stmt
let _ = Callback.register "Cil.d_block" Cil.d_block
let _ = Callback.register "Cil.d_global" Cil.d_global
let _ = Callback.register "Cil.d_shortglobal" Cil.d_shortglobal


let _ = Callback.register "Cil.dn_exp" Cil.dn_exp
let _ = Callback.register "Cil.dn_lval" Cil.dn_lval
let _ = Callback.register "Cil.dn_init" Cil.dn_init
let _ = Callback.register "Cil.dn_type" Cil.dn_type
let _ = Callback.register "Cil.dn_global" Cil.dn_global
let _ = Callback.register "Cil.dn_attrlist" Cil.dn_attrlist
let _ = Callback.register "Cil.dn_attr" Cil.dn_attr
let _ = Callback.register "Cil.dn_attrparam" Cil.dn_attrparam
let _ = Callback.register "Cil.dn_stmt" Cil.dn_stmt
let _ = Callback.register "Cil.dn_instr" Cil.dn_instr





(*******************************************
wrapper for cfg
********************************************)

let _ = Callback.register "Cfg.computeFileCFG" Cfg.computeFileCFG
let _ = Callback.register "Cfg.clearFileCFG" Cfg.clearFileCFG
let _ = Callback.register "Cfg.cfgFun" Cfg.cfgFun
let _ = Callback.register "Cfg.clearCFGinfo" Cfg.clearCFGinfo
let _ = Callback.register "Cfg.printCfgChannel" Cfg.printCfgChannel
let _ = Callback.register "Cfg.printCfgFilename" Cfg.printCfgFilename

let get_start_id () = Cfg.start_id
let _ = Callback.register "Cfg.start_id" get_start_id
(*let get_nodeList () = Cfg.nodeList
let _ = Callback.register "Cfg.nodeList" get_nodeList
let get_numNodes () = Cfg.numNodes
let _ = Callback.register "Cfg.numNodes" get_numNodes
*)


(*******************************************
wrapper for Points-to Analysis
********************************************)

let _ = Callback.register "Ptranal.analyze_file" Ptranal.analyze_file
let _ = Callback.register "Ptranal.may_alias" Ptranal.may_alias
let _ = Callback.register "Ptranal.resolve_lval" Ptranal.resolve_lval
let _ = Callback.register "Ptranal.resolve_exp" Ptranal.resolve_exp
let _ = Callback.register "Ptranal.resolve_funptr" Ptranal.resolve_funptr



(*******************************************
wrapper for Pretty
********************************************)
let get_nil () = Pretty.nil
let _ = Callback.register "Pretty.nil" get_nil

let _ = Callback.register "Pretty.fprint" Pretty.fprint

 